﻿#ifndef COMM_THREAD_H
#define COMM_THREAD_H


#include <QThread>
#include <QtNetwork>
#include <QtSerialPort>
//#include "serial.h"

class ComThread : public QThread
{
    Q_OBJECT
public:
    ComThread();
    void run();

public slots:
    void udpReadDataGrams();

private:
    // 网络通信服务器
    QUdpSocket *udp_server = nullptr;
    QUdpSocket *udp_send = nullptr;
    QSerialPort *commPort = nullptr;
    //serial_t * commSerPort = NULL;
};


#endif // COMM_THREAD_H
